Page({
  data: {
    userInfo: {},
    hidden: false
  },
  // onShareAppMessage: function () {
  //   return {
  //     title: "寻它",
  //     desc: "寻它",
  //     imageUrl: '/img/img_1.jpg',
  //     path: '/pages/login',
  //   }
  // },
  onLoad: function (options) {},
  onShow() {
    let slet = this;
    slet.getUserInfo();
  },
  getUserInfo() {
    let Token = getApp().data.SessionKey;
    if (Token != '') {
      var that = this;
      wx.request({
        url: getApp().data.apiUrl + '/UserInfo.ashx?SessionKey=' + Token,
        headers: {
          'Content-Type': 'application/json'
        },
        success: function (res) {
          var query_clone = JSON.parse(decodeURIComponent(JSON.stringify(res.data)));
          //console.log(query_clone);
          getApp().globalData.userInfo.uid = query_clone.id;
          that.setData({
            userInfo: query_clone,
            hidden: true
          })
        }
      })
    }
  }
})